/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class SongArtistalbumsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "artistId")
    private int artistId;
    @Basic(optional = false)
    @Column(name = "albumId")
    private int albumId;

    public SongArtistalbumsPK() {
    }

    public SongArtistalbumsPK(int artistId, int albumId) {
        this.artistId = artistId;
        this.albumId = albumId;
    }

    public int getArtistId() {
        return artistId;
    }

    public void setArtistId(int artistId) {
        this.artistId = artistId;
    }

    public int getAlbumId() {
        return albumId;
    }

    public void setAlbumId(int albumId) {
        this.albumId = albumId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) artistId;
        hash += (int) albumId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongArtistalbumsPK)) {
            return false;
        }
        SongArtistalbumsPK other = (SongArtistalbumsPK) object;
        if (this.artistId != other.artistId) {
            return false;
        }
        if (this.albumId != other.albumId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongArtistalbumsPK[artistId=" + artistId + ", albumId=" + albumId + "]";
    }

}
